﻿using System.Collections.Generic;
using Hourglass.Qrobot.MessageProcesser;
using Hourglass.Qrobot.Models;

namespace Hourglass.Qrobot.Test
{
    public class ReplyProcesser : IReplyProcesser
    {
        public MonitorType MonitorType => MonitorType.Disscuss;

        public string NumberOrName { get; set; } = "测试测试测测测";

        public List<ReplyMessage> Process(QqMessage message)
        {
            var replys = new List<ReplyMessage>();
            var reply = new ReplyMessage {Target = new ReplyTarget {TargetType = ReplyTargetType.Default} };
            replys.Add(reply);

            foreach (var atPerson in message.AtQqList)
            {
                replys.Add(new ReplyMessage
                {
                    Target = new ReplyTarget {TargetType = ReplyTargetType.Personal, NumberOrName = atPerson.Qq.ToString()},
                    Content = $"你在 {NumberOrName} 讨论组中被@了，赶紧去看看吧"
                });
            }
            reply.Content = $"复读机： {message.FullContent}";

            return replys;
        }
    }
}
